package org;

import redis.clients.jedis.Jedis;

public class JedisServ {
    private static Jedis jedis = null;

    static{
        if(jedis ==null){
            jedis = new Jedis("127.0.0.1",6379);
        }
    }

    public static void put(String key ,String value){
        //24小时过期制
        jedis.setex(key,24*60*60,value);
    }

    public static boolean exists(String key){
        return jedis.exists(key);
    }
}
